Platform Explorer / Nuxeo Platform 5.8

Component org.nuxeo.ecm.webapp.contentview.search.contrib

Contributions

XML Source

<?xml version="1.0"?>

<component name="org.nuxeo.ecm.webapp.contentview.search.contrib">

  <extension target="org.nuxeo.ecm.platform.ui.web.ContentViewService"
    point="contentViews">

    <contentView name="simple_search">

      <title>label.search.form.simple</title>
      <translateTitle>true</translateTitle>
      <iconPath>/icons/document_listing_icon.png</iconPath>
      <showTitle>true</showTitle>

      <emptySentence>label.content.empty.search</emptySentence>
      <translateEmptySentence>true</translateEmptySentence>

      <coreQueryPageProvider>
        <property name="maxResults">DEFAULT_NAVIGATION_RESULTS</property>
        <property name="coreSession">#{documentManager}</property>
        <pattern>
          SELECT * FROM Document WHERE ecm:fulltext LIKE ? AND
          ecm:mixinType !=
          'HiddenInNavigation' AND ecm:isCheckedInVersion = 0
          AND
          ecm:currentLifeCycleState != 'deleted'
        </pattern>
        <parameter>#{documentSearchActions.simpleSearchKeywords}</parameter>
        <!-- sort column="dc:title" ascending="true" / sort by fulltext relevance -->
        <sortInfosBinding>
          #{documentSearchActions.searchSortInfos}
        </sortInfosBinding>
        <pageSize>20</pageSize>
      </coreQueryPageProvider>

      <showPageSizeSelector>true</showPageSizeSelector>
      <useGlobalPageSize>true</useGlobalPageSize>
      <refresh>
        <event>documentChanged</event>
        <event>documentChildrenChanged</event>
      </refresh>
      <cacheKey>only_one_cache</cacheKey>
      <cacheSize>1</cacheSize>

      <resultColumns>
        #{documentSearchActions.selectedLayoutColumns}
      </resultColumns>
      <resultLayouts>
        <layout name="search_listing_ajax" title="document_listing"
          translateTitle="true" iconPath="/icons/document_listing_icon.png"
          showCSVExport="true" showPDFExport="false" showSyndicationLinks="true" />
        <layout name="document_virtual_navigation_listing_ajax_compact_2_columns"
          title="document_listing_compact_2_columns" translateTitle="true"
          iconPath="/icons/document_listing_compact_2_columns_icon.png"
          showCSVExport="true" showPDFExport="false" showSyndicationLinks="true" />
        <layout name="document_virtual_navigation_listing_ajax_icon_2_columns"
          title="document_listing_icon_2_columns" translateTitle="true"
          iconPath="/icons/document_listing_icon_2_columns_icon.png"
          showCSVExport="true" showPDFExport="false" showSyndicationLinks="true" />
      </resultLayouts>

      <selectionList>CURRENT_SELECTION</selectionList>
      <actions category="CURRENT_SELECTION_LIST" />

    </contentView>


    <contentView name="advanced_search">

      <title>command.advancedSearch</title>
      <translateTitle>true</translateTitle>
      <showTitle>true</showTitle>

      <emptySentence>label.content.empty.search</emptySentence>
      <translateEmptySentence>true</translateEmptySentence>

      <coreQueryPageProvider>
        <property name="coreSession">#{documentManager}</property>
        <property name="maxResults">DEFAULT_NAVIGATION_RESULTS</property>
        <whereClause docType="AdvancedSearch">
          <predicate parameter="ecm:fulltext" operator="FULLTEXT">
            <field schema="advanced_search" name="fulltext_all" />
          </predicate>

          <predicate parameter="ecm:isCheckedInVersion" operator="=">
            <field schema="advanced_search" name="isCheckedInVersion" />
          </predicate>

          <predicate parameter="ecm:path" operator="STARTSWITH">
            <field schema="advanced_search" name="searchpath" />
          </predicate>

          <predicate parameter="dc:title" operator="FULLTEXT">
            <field schema="advanced_search" name="title" />
          </predicate>

          <predicate parameter="dc:description" operator="FULLTEXT">
            <field schema="advanced_search" name="description" />
          </predicate>

          <predicate parameter="dc:rights" operator="LIKE">
            <field schema="advanced_search" name="rights" />
          </predicate>

          <predicate parameter="dc:source" operator="LIKE">
            <field schema="advanced_search" name="source" />
          </predicate>

          <predicate parameter="dc:nature" operator="IN">
            <field schema="advanced_search" name="nature" />
          </predicate>

          <predicate parameter="dc:coverage" operator="IN">
            <field schema="advanced_search" name="coverage" />
          </predicate>

          <predicate parameter="dc:subjects" operator="IN">
            <field schema="advanced_search" name="subjects" />
          </predicate>

          <predicate parameter="dc:created" operator="BETWEEN">
            <field schema="advanced_search" name="created_min" />
            <field schema="advanced_search" name="created_max" />
          </predicate>

          <predicate parameter="dc:modified" operator="BETWEEN">
            <field schema="advanced_search" name="modified_min" />
            <field schema="advanced_search" name="modified_max" />
          </predicate>

          <predicate parameter="dc:issued" operator="BETWEEN">
            <field schema="advanced_search" name="issued_min" />
            <field schema="advanced_search" name="issued_max" />
          </predicate>

          <predicate parameter="dc:valid" operator="BETWEEN">
            <field schema="advanced_search" name="valid_min" />
            <field schema="advanced_search" name="valid_max" />
          </predicate>

          <predicate parameter="dc:expired" operator="BETWEEN">
            <field schema="advanced_search" name="expired_min" />
            <field schema="advanced_search" name="expired_max" />
          </predicate>

          <predicate parameter="dc:format" operator="LIKE">
            <field schema="advanced_search" name="format" />
          </predicate>

          <predicate parameter="dc:language" operator="LIKE">
            <field schema="advanced_search" name="language" />
          </predicate>

          <predicate parameter="ecm:currentLifeCycleState" operator="!=">
            <field schema="advanced_search" name="currentLifeCycleState" />
          </predicate>
          <fixedPart>
            ecm:mixinType != 'HiddenInNavigation' AND
            ecm:isCheckedInVersion = 0
          </fixedPart>
        </whereClause>
        <!-- sort column="dc:title" ascending="true" / sort by fulltext relevance -->
        <pageSize>20</pageSize>
        <sortInfosBinding>
          #{documentSearchActions.searchSortInfos}
        </sortInfosBinding>
      </coreQueryPageProvider>

      <searchLayout name="advanced_search" />
      <showFilterForm>true</showFilterForm>

      <showPageSizeSelector>true</showPageSizeSelector>
      <useGlobalPageSize>true</useGlobalPageSize>
      <refresh>
        <event>documentChanged</event>
        <event>documentChildrenChanged</event>
      </refresh>
      <cacheKey>only_one_cache</cacheKey>
      <cacheSize>1</cacheSize>

      <resultColumns>
        #{documentSearchActions.selectedLayoutColumns}
      </resultColumns>
      <resultLayouts>
        <layout name="search_listing_ajax" title="document_listing"
          translateTitle="true" iconPath="/icons/document_listing_icon.png"
          showCSVExport="true" showPDFExport="false" showSyndicationLinks="true" />
        <layout name="document_virtual_navigation_listing_ajax_compact_2_columns"
          title="document_listing_compact_2_columns" translateTitle="true"
          iconPath="/icons/document_listing_compact_2_columns_icon.png"
          showCSVExport="true" showPDFExport="false" showSyndicationLinks="true" />
        <layout name="document_virtual_navigation_listing_ajax_icon_2_columns"
          title="document_listing_icon_2_columns" translateTitle="true"
          iconPath="/icons/document_listing_icon_2_columns_icon.png"
          showCSVExport="true" showPDFExport="false" showSyndicationLinks="true" />
      </resultLayouts>

      <selectionList>CURRENT_SELECTION</selectionList>
      <actions category="CURRENT_SELECTION_LIST" />
      <flags>
        <flag>ADVANCED_SEARCH</flag>
      </flags>

    </contentView>

    <contentView name="nxql_search">

      <emptySentence>label.content.empty.search</emptySentence>
      <translateEmptySentence>true</translateEmptySentence>

      <coreQueryPageProvider>
        <property name="coreSession">#{documentManager}</property>
        <property name="maxResults">DEFAULT_NAVIGATION_RESULTS</property>
        <pattern quoteParameters="false" escapeParameters="false">?</pattern>
        <parameter>#{documentSearchActions.nxqlQuery}</parameter>
        <!-- sort column="dc:title" ascending="true" / sort by fulltext relevance -->
        <sortInfosBinding>
          #{documentSearchActions.searchSortInfos}
        </sortInfosBinding>
        <pageSize>20</pageSize>
      </coreQueryPageProvider>

      <showPageSizeSelector>true</showPageSizeSelector>
      <useGlobalPageSize>true</useGlobalPageSize>
      <refresh>
        <event>documentChanged</event>
        <event>documentChildrenChanged</event>
        <event></event>
      </refresh>
      <cacheKey>only_one_cache</cacheKey>
      <cacheSize>1</cacheSize>

      <resultColumns>
        #{documentSearchActions.selectedLayoutColumns}
      </resultColumns>
      <resultLayouts>
        <layout name="search_listing_ajax" title="document_listing"
          translateTitle="true" iconPath="/icons/document_listing_icon.png"
          showCSVExport="true" showPDFExport="false" showSyndicationLinks="true" />
        <layout name="document_virtual_navigation_listing_ajax_compact_2_columns"
          title="document_listing_compact_2_columns" translateTitle="true"
          iconPath="/icons/document_listing_compact_2_columns_icon.png"
          showCSVExport="true" showPDFExport="false" showSyndicationLinks="true" />
        <layout name="document_virtual_navigation_listing_ajax_icon_2_columns"
          title="document_listing_icon_2_columns" translateTitle="true"
          iconPath="/icons/document_listing_icon_2_columns_icon.png"
          showCSVExport="true" showPDFExport="false" showSyndicationLinks="true" />
      </resultLayouts>

      <selectionList>CURRENT_SELECTION</selectionList>
      <actions category="CURRENT_SELECTION_LIST" />

    </contentView>

  </extension>

</component>